... '+rpi.Utils.__("read more",n)+"":"")}return g},opentext:function(){let g=this.parentNode,m=this.previousSibling,n=this.previousSibling.previousSibling,q=m.value;rpi.Utils.rm(m);rpi.Utils.rm(n);rpi.Utils.rm(this);g.innerHTML+=q}}};rpi=rpi||{}; rpi.View=function(a,b,e){const h=a.getAttribute("data-id"),g=a.getElementsByClassName("rpi-cnt")[0],m=a.getElementsByClassName("rpi-header")[0],n=a.getElementsByClassName("rpi-content")[0];var q=null;return q={init:function(){q.initMedia();q.initStyle()},loadNextReviews:function(c,f){let d=parseInt(g.getAttribute("data-count")),l=parseInt(g.getAttribute("data-offset"));if(0l?l:f-d;reviewsEl= n.getElementsByClassName("rpi-cards")[0];reviewsList=reviewsEl.getElementsByClassName("rpi-card");len=reviewsList.length-1;g.setAttribute("data-offset",d+f);for(d=0;d '+ (b.hide_avatar?"":q.reviewAvatar(c))+''+(b.hide_name?"":q.reviewName(c))+(b.disable_review_time?"":'')+rpi.View.stars(c.rating,c.provider)+'"}, reviewReply:function(c,f){let d=c.getElementsByClassName("rpi-reply")[0];d||(d=document.createElement("div"),d.className="rpi-reply rpi-scroll",c.getElementsByClassName("rpi-body")[0].appendChild(d));d.innerHTML=""+rpi.Utils.__("Response from the owner",b.trans)+": "+f},reviewName:function(c){const f=rpi.Utils.capit(c.provider)+" user",d=c.author_name?c.author_name:f;return c.author_url&&!b.disable_user_link?rpi.Utils.anchor(c.author_url,d,b,"rpi-name",f+" profile"):''+c.text+""+(c.media?''+q.reviewMedia(c)+"":"")+(f?''+rpi.Utils.__("Response from the owner",b.trans)+": "+f+"":"")+"'+ d+""},reviewAvatar:function(c){let f=c.author_avatar;var d=a.style.getPropertyValue("--img-size");d=d?d.replace("px",""):56;let l=b.hide_name&&c.author_name?c.author_name:"";switch(c.provider){case "google":(c=f.match(/googleusercontent\.com\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/photo\.jpg/))&&4=d?"ms":"o")+".jpg")}return' "},reviewMedia:function(c){let f="";var d=a.style.getPropertyValue("--media-lines");d=22*(d?d:2);for(let l=0;l';return f},initStyle:function(){let c=JSON.parse(a.getAttribute("data-opts"));if(m){var f=m.getElementsByClassName("rpi-card");for(var d=0;d ')}},initLogoMultiple:function(c,f,d,l){let r=c.getElementsByClassName("rpi-logos")[0];r||=this.createLogos(d);switch(l){case "0":rpi.Utils.rm(r);break;case "1":f.prepend(r);break;case "2":(c=c.getElementsByClassName("rpi-name")[0])&&c.prepend(r); break;case "4":f=c.getElementsByClassName("rpi-score")[0];c=c.getElementsByClassName("rpi-stars")[0];f.appendChild(r);f.insertBefore(r,c);break;case "5":if(c=c.getElementsByClassName("rpi-based")[0])f=c.innerText.match(/(\d+)/)[1],c.innerHTML=c.innerText.replace(f,f+" "+r.outerHTML),rpi.Utils.rm(r)}},createLogos:function(c){let f=document.createElement("span");f.className="rpi-logos";for(let d=0;d ';return f},getCssVar:function(c){return a.style.getPropertyValue(c)}, initMedia:function(){let c=n.getElementsByClassName("rpi-thumb");for(let f=0;f ",c=l.querySelector(".rpi-lightbox-x"),r=l.querySelector(".rpi-slider-prev"),next=l.querySelector(".rpi-slider-next"),c.onclick=function(){l.style.display="none"},l.onclick=function(u){l==u.target&&(l.style.display="none")},r.onclick=function(u){q.media(f[d-1],f,d-1)},next.onclick=function(u){q.media(f[d+1],f,d+1)},document.body.appendChild(l);l.style.display="flex"}}}; rpi.View.stars=function(a,b){return''+ review+"'+rpi.View.star(a)+""};rpi.View.star=function(a){for(var b="",e=1;6>e;e++){var h=a-e;b=0<=h?b+'':-1h?-.75>h?b+'':-.25 ':b+'':b+''}return b};rpi=rpi||{}; rpi.Slider=function(a,b,e,h){a.getAttribute("data-id");const g=a.getElementsByClassName(e.cnt)[0],m=a.getElementsByClassName(e.content)[0],n=m.getElementsByClassName(e.cards)[0],q=m.getElementsByClassName(e.dotsWrap)[0],c=m.getElementsByClassName(e.dots)[0],f=parseInt(g.getAttribute("data-count"));var d=null,l=m.getElementsByClassName(e.card),r="",u="",t=null,y=null,z=null,w=null,v=!1,A=!1,B=0,D=0;return d={init:function(k,p){rpi.Utils.isVisible(g)?(k&&k(),d.resize(),d.actions(),l.length&&d.swipeAutoStart(), p&&p(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(d)):setTimeout(d.init,300)},resize:function(k){let p=h.column.resize(),C=h.column.getCol();k&&n.scrollLeft!=k*d.reviewWidth()&&n.scrollTo(l[k].offsetLeft,0);!l.length||r==p&&u==C||(d.hasDots()&&(d.dotsInit(),d.dotSwipe(k,!0)),r=p,u=C)},actions:function(){b.mousestop&&d.addMouseEvents();window.addEventListener("resize",d.resizeListener);n&&(n.addEventListener("scroll",d.scrollListener,!1),b.wheelscroll&&m.addEventListener("wheel",d.wheelListener, !1));var k=g.getElementsByClassName(e.btnPrev)[0];k&&(k.onclick=function(p){d.btnClick(-1)});if(k=g.getElementsByClassName(e.btnNext)[0])k.onclick=function(p){d.btnClick(1)}},resizeListener:function(){var k=D;clearTimeout(t);t=setTimeout(d.resize,150,k)},scrollListener:function(){clearTimeout(y);clearTimeout(z);z=setTimeout(d.scrollEnd,150)},wheelListener:function(k){var p=k.target;if((p=-1 p.clientHeight)return!0;k.preventDefault();B++;clearTimeout(w);w=setTimeout(d.wheelEnd,150,k)},addMouseEvents:function(){g.addEventListener("mouseover",d.mouseOver,!1);g.addEventListener("mouseleave",d.mouseLeave,!1)},delMouseEvents:function(){g.removeEventListener("mouseover",d.mouseOver);g.removeEventListener("mouseleave",d.mouseLeave)},mouseOver:function(){v=1;d.swipeAutoStop()},mouseLeave:function(){v=0;d.swipeAutoStart()},btnClick:function(k){d.swipeManual(k*d.swipePerBtn())},wheelEnd:function(k){d.swipeManual(Math.sign(k.wheelDelta)* B*d.swipeStep());B=0},scrollEnd:function(){D=d.reviewsIdx();A?A=!1:d.loadNextReviews();(!b.mousestop||v)&&b.mousestop||(!b.clickstop||A)&&b.clickstop||d.swipeAutoStart();d.hasDots()&&d.dotSwipe(void 0,!0)},loadNextReviews:function(k){k=k?d.reviewsIdx()+parseInt(k):d.hasDots()?(k=c.getElementsByClassName("active")[0])?parseInt(k.getAttribute("data-index"))*d.swipePerDot():d.reviewsIdx():d.reviewsIdx();k=d.getAjaxSize(k);0 C){let F=k-C;Math.abs(F)<3*d.swipePerDot()?p=E:F&&(p=Math.ceil(k/E)*E-C)}k=C+p-f;return 0 k?0:k>=c.childNodes.length?c.childNodes.length-1:k;k=c.querySelector("."+e.dot+'[data-index="'+k+'"]');let C=c.getElementsByClassName("active")[0];d.dotActivate(C,k);d.dotScroll(k,p)},dotScroll:function(k,p){let C=Math.round(c.scrollWidth/ c.childNodes.length),E=Math.floor(Math.round(c.offsetWidth/C)/2);p?c.scrollTo(k.offsetLeft-E*C,0):c.scrollTo({left:k.offsetLeft-E*C,behavior:"smooth"})},dotActivate:function(k,p){k&&(k.classList.remove("active"),k.classList.remove("s1"),k.previousSibling&&(k.previousSibling.classList.remove("s2"),k.previousSibling.previousSibling&&k.previousSibling.previousSibling.classList.remove("s3")),k.nextSibling&&(k.nextSibling.classList.remove("s2"),k.nextSibling.nextSibling&&k.nextSibling.nextSibling.classList.remove("s3"))); p&&(p.classList.add("active"),p.classList.add("s1"),p.previousSibling&&(p.previousSibling.classList.add("s2"),p.previousSibling.previousSibling&&p.previousSibling.previousSibling.classList.add("s3")),p.nextSibling&&(p.nextSibling.classList.add("s2"),p.nextSibling.nextSibling&&p.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(k){A=!0;d.loadNextReviews(k);d.scroll(k);b.clickstop&&(d.swipeAutoStop(),d.delMouseEvents())},swipeAuto:function(){if(d.isScrollEnd())d.scroll(-(f-d.reviewsPerView())); else{let k=d.swipeStep() p?0:p>=l.length?l.length-1:p;-1 Math.abs(k.left-p.left)||k.left<=p.left)&&p.left
Math.abs(k.right-p.right)||k.right>=p.right)&&p.right>k.left},swipeStep:function(){return b.swipe_step||d.reviewsPerView()},swipePerBtn:function(){return b.swipe_per_btn||d.reviewsPerView()},swipePerDot:function(){return b.swipe_per_dot||d.reviewsPerView()},reviewWidth:function(){return Math.round(n.scrollWidth/ l.length)},reviewHeight:function(){return l[0].offsetHeight},reviewsPerView:function(){return Math.round(n.offsetWidth/d.reviewWidth())},reviewsIdx:function(){let k=rpi.Utils.isRTL()?-n.scrollLeft:n.scrollLeft;return Math.round(k/d.reviewWidth())},reviewsAhead:function(){return l.length-(d.reviewsIdx()+d.reviewsPerView())},hasDots:function(){return c&&!b.hide_dots&&0 '} function simple_star(a,b,e){return''}function simple_stars(a,b){for(var e="",h=1;6>h;h++){var g=a-h;e=0<=g?e+simple_star("",b):-1 g?-.75>g?e+simple_star("-o",b):-.25 g;g++)h+=simple_star("",b,1<=a-g?e:0 ';case "facebook":return'';case "yelp":return''}} function render_rplg_logo(a){return"summary"==a?"":'"}function _rplg_add_svg(){var a=document.getElementById("rplg-svg");a||(a=document.createElement("span"),a.id="rplg-svg",a.style.display="none",a.innerHTML=rplg_svg(),document.body.appendChild(a))} function _rplg_init_svg(a){_rplg_add_svg();for(var b=a.querySelectorAll(".rplg-stars"),e=0;e reviews.length&&b.removeChild(this);return!1}function rplg_leave_review_window(){_rplg_popup(this.getAttribute("href"),620,500);return!1} function _rplg_lang(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()} function _rplg_popup(a,b,e){var h=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+b+", height="+e+", top="+((window.innerHeight?window.innerHeight:h.clientHeight?h.clientHeight:screen.height)/2-e/2+(void 0!=window.screenTop?window.screenTop:window.screenY))+", left="+((window.innerWidth?window.innerWidth:h.clientWidth?h.clientWidth:screen.width)/2-b/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a} function _rplg_init_timeago(a){a=a.querySelectorAll(".rplg [data-time]");for(var b=0;b u.offsetWidth?"grw-row grw-row-xs":750>u.offsetWidth?"grw-row grw-row-x":1100>u.offsetWidth?"grw-row grw-row-s":1450>u.offsetWidth?"grw-row grw-row-m":1800>u.offsetWidth?"grw-row grw-row-l":"grw-row grw-row-xl";f.length&&setTimeout(h,200)}function h(){var u=a.querySelector(".grw-slider-reviews"),t=a.querySelectorAll(".grw-slider-review"),y=Math.round(u.offsetWidth/t[0].offsetWidth),z=Math.ceil(t.length/ y),w=a.querySelector(".grw-slider-dots");if(w){w.innerHTML="";for(var v=0;v Math.abs(u.left-t.left)||u.left<=t.left)&&t.left Math.abs(u.right- t.right)||u.right>=t.right)&&t.right>u.left?c.scrollBy(-c.scrollWidth,0):g(1);l=setTimeout(m,q)}const n=a.querySelector(".grw-slider"),q=1E3*b.speed,c=a.querySelector(".grw-slider-reviews"),f=a.querySelectorAll(".grw-slider-review");var d=null,l=null,r=function(){(n.offsetWidth||n.offsetHeight||n.getClientRects().length)&&"hidden"!==window.getComputedStyle(n).visibility?(e(),f.length&&setTimeout(m,q)):setTimeout(r,300)};r();window.addEventListener("resize",function(){clearTimeout(d);d=setTimeout(function(){e()}, 150)});c.addEventListener("scroll",function(){setTimeout(h,200)});if(b=a.querySelector(".grw-slider-prev"))b.onclick=function(){c.scrollBy(-f[0].offsetWidth,0);l&&clearInterval(l)};if(b=a.querySelector(".grw-slider-next"))b.onclick=function(){g(1);l&&clearInterval(l)}} function _rplg_init_flash(a,b){var e="flash_"+a.getAttribute("data-id");if(!sessionStorage.getItem(e)){var h=0,g=!1,m=!1,n=[],q=a.querySelector(".rplg-flash-content"),c=q.querySelector(".rplg-flash-x"),f=q.querySelector(".rplg-flash-card"),d=q.querySelector(".rplg-flash-story"),l=1E3*(b.flash_start||3),r=1E3*(b.flash_visible||5),u=1E3*(b.flash_invisible||5),t=null;document.body.appendChild(a);for(var y=a.querySelectorAll(".rplg-form-review"),z=0;z '; c.onclick=function(){p.className="rplg-form-review";f.className="rplg-flash-card";g=!1;m=!0;c.innerHTML="\u00d7";c.onclick=D}}}} function _rplg_flashnext(a,b,e,h,g){b.firstChild?(a=h[e],b.querySelector(".rplg-row").setAttribute("data-idx",e),g.flash_user_photo?b.querySelector(".rplg-flash-img").innerHTML=' ':g.hide_avatar||(b.querySelector(".rplg-flash-photo").innerHTML='
'),g.hide_name||(b.querySelector(".rplg-flash-name").innerHTML= a.author_name),b.querySelector(".rplg-flash-rating").innerHTML=parseInt(a.rating),b.querySelector(".rplg-flash-stars").innerHTML=_rplg_flashtext(a,g),g.disable_review_time||(b.querySelector(".rplg-flash-time").innerHTML=g.time_format?a.time:rpi.Time.getTimeAgo(1E3*a.time,_rplg_lang(),"ago"))):b.innerHTML=_rplg_flashstory(e,h,g)} function _rplg_flashstory(a,b,e){b=b[a];return'
'+(e.flash_hide_logo&&!e.flash_user_photo?"":''} function _rplg_flashtext(a,b){var e=[a.rating,a.provider,"#ffa318"].join();return''+render_stars(a.rating,a.provider)+" "+b.text.m2+' '+render_logo(a.provider)+""}function _rplg_get_parent(a,b){b=b||"rplg";if(0>a.className.split(" ").indexOf(b))for(;(a=a.parentElement)&&0>a.className.split(" ").indexOf(b););return a} function rplg_init(a,b){a=_rplg_get_parent(a,"rplg");var e=a.querySelector("img[data-exec]");if("true"==e.getAttribute("data-exec"))return a;_rplg_init_svg(a);_rplg_init_timeago(a);_rplg_read_more(a);b&&b(a);e.setAttribute("data-exec","true");return a}function rplg_init_slider_theme(a,b){rplg_init(a,function(e){_rplg_init_slider(e,b)})}function rplg_init_sliderlite_theme(a,b){rplg_init(a,function(e){_rplg_init_sliderlite(e,b)})}function rplg_init_grid_theme(a){rplg_init(a)} function rplg_init_list_theme(a){rplg_init(a)}function rplg_init_badge_theme(a){rplg_init(a,function(b){_rplg_badge_init(b)})}function rplg_init_temp_theme(a){rplg_init(a)}function rplg_init_flash_theme(a,b){rplg_init(a,function(e){_rplg_init_flash(e,b)})} document.addEventListener("DOMContentLoaded",function(){for(var a=document.querySelectorAll('.rplg img[data-exec="false"]'),b=0;b")+''+(e.flash_user_photo?'':'')+ "
'+(e.flash_user_photo||e.hide_avatar?"":'')+(e.hide_name?"":''+b.author_name+" ")+" "+e.text.m1.replace("%s",'")+'
'+_rplg_flashtext(b,e)+' ',document.body.appendChild(n));let q=n.getElementsByClassName("rpi-sb")[0];q.getElementsByClassName("rpi-sbx")[0].onclick= function(c){q.style.opacity=0=c&&rpi.Utils.rm(q)});return!1})}}},Slider:function(a,b){const e=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),h=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),g=rpi.View(a,b,{common:e});b=a.getElementsByClassName("rpi-cnt")[0];b=JSON.parse(b.getAttribute("data-opts"));const m=rpi.Slider(a,b,{cnt:"rpi-cnt", col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card",text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:g,column:h});return{init:function(){m.init(function(){e.init()},function(){g.init();console.log("RichPlugins slider initialized")})}}},init:function(a){a.setAttribute("data-exec","1");let b=JSON.parse(a.getAttribute("data-opts")),e=rpi.Utils.capit(b.layout);"List"==e||"Grid"==e?RichPlugins.List(a,b).init(): RichPlugins[e](a,b).init()}};document.addEventListener("DOMContentLoaded",function(){const a=document.querySelectorAll('.rpi[data-exec=""]');if(a.length){rpi.Utils.clear();for(var b=0;b